<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib prefix="sys" uri="/WEB-INF/tld/sys.tld" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>三方结清记录</title>
    <jsp:include page="../import.jsp" flush="true"/>
</head>

<body class="iframeBody">
<div class="Wrapper">
    <div class="searchArea">
        <form id="searchBar">
        </form>
    </div>

    <div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var basePath = '<%=path%>';
    var grid = null;
    var applyId = '${applyId}';
    $(function () {

        grid = $("#ligergrid1").ligerGrid({
            url: basePath + '/settle/triple/initList.do',
            parms: {applyId: applyId},
            method: 'get',
            columns: [
                {display: '主键', name: 'id', minWidth: 130, align: 'center', enabledSort: false},
                {display: '机构编号', name: 'insCode', width: 150, align: 'center', enabledSort: false},
                {
                    display: '试算金额', name: 'tripleAmount', width: 90, align: 'right', enabledSort: false,
                    render: function (rowdata, index, value) {
                        if (value != null) {
                            return '&yen;' + FormatMoney(Math.abs(value) / 100);
                        }
                        return '';
                    }
                },
                {display: '试算返回码', name: 'trialCode', width: 130, align: 'center', enabledSort: false},
                {display: '状态', name: 'stsCdNm', width: 100, align: 'center', enabledSort: false},
                {display: '结果', name: 'resultStr', width: 170, align: 'center', enabledSort: false,
                    render: function (rowdata, index, value) {
                        if (StringUtils.isEmpty(value)) {
                            return value;
                        }
                        var h='<span class="gridTip" title="'+ value +'">'+ value +'</span>'
                        return h;
                    }
                },
                {display: '创建时间', name: 'crtTm', width: 140, align: 'center', enabledSort: false, render: renderDate2},
                {display: '更新时间', name: 'mdfTm', width: 140, align: 'center', enabledSort: false, render: renderDate2}
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: false,
            rownumbers: true,
            allowUnSelectRow: true,
            alternatingRow: true,
            frozen: false
        });
        grid.setHeight(100);
    });

    //格式化时间
    function renderDate2(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }

</script>

</body>
</html>
